<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <title>数据采集平台</title>
    <link rel="shortcut icon" th:href="@{/img/favicon.ico}" href="../static/img/favicon.ico">
    <link th:href="@{/css/bootstrap.min.css}" href="../static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link th:href="@{/css/font-awesome.min.css}" href="../static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link th:href="@{/css/animate.css}" href="../static/css/animate.css" rel="stylesheet">
    <link th:href="@{/css/style.css}" href="../static/css/style.css?v=4.1.0" rel="stylesheet">
	<style type="text/css">
		.layui-bg-primary {
			background: #2667DF;
		}
		
		.layui-logo a{
			color: #FFFFFF;
			font-size: 20px;
			font-weight: bold;
			line-height: 57px;
			margin-left: 20px;
		}
		.layuiNavFirst{
			background: #2667DF;
		}
		.layuiNavFirst li a {
			font-size: 16px;
			color: #FFFFFF !important;
		}
		/* 修改导航栏的选中样式 */
		.layuiNavFirst .layui-nav-bar {
			background-color: #FFFFFF;
		}
		
		.layuiNavColor .layui-nav-item a:hover {
			font-weight: bold;
		}
		
		.layuiNavColorA{
			font-weight: bold;
		}
		/* 二级导航条 */
		.header-header {
			background: #FFFFFF;
			height: 45px;
			line-height: 45px;
			border-top: 1px solid #E4E4E4;
			border-bottom: 1px solid #E4E4E4;
			padding: 0px 10px 0px 25px;
		}
		.layuiNavSectend li a {
			font-size: 14px !important;
			height: 45px;
			line-height: 45px;
			display: block;
			float: left;
			padding: 0px 20px;
			color: #333333;
			margin-left: 10px;
		}
		.layuiNavSectend li a:hover {
			color: #2667DF;
			border-bottom: 3px solid #2667DF !important;
		}
		.layuiNavSectendLiA{
			color: #2667DF !important;
			border-bottom: 3px solid #2667DF !important;
		}
		
		
		#page-wrapper{
			margin: 0 0 0 0;
			height: auto;
			min-height: 100%;
			background: #F5F6FA;
		}
		#content-main {
		    height: calc(100% - 150px);
			overflow-x: hidden;
			overflow-y: auto;
		}
		.content-tabs {
		    border-bottom: solid 1px #E4E4E4;
			height: 0px;
			line-height: 0px;
		}
		.page-tabs a.active{
			background: #2667DF !important;
			color: #FFFFFF;
		}
		.page-tabs a.active:hover {
		    background: #1530df !important;
		}
	</style>
</head>
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
<div style="overflow: hidden;" id="wrapper">
    <!--导航开始-->
    <div class="layui-header layui-bg-primary">
    	<div class="layui-logo">
			<a href=""><img src="../img/logo.jpg" class="layui-nav-img">数据采集平台</a>
		</div>
    	<!-- 头部区域（可配合layui已有的水平导航） -->
    	<ul class="layui-nav layui-layout-left layuiNavFirst layuiNavColor">
			<li class="layui-nav-item" lay-unselect><a id="1" class="layuiNavColorA" href="javascript:;">首页</a></li>
			<li class="layui-nav-item" lay-unselect><a id="2" href="javascript:;">资源库管理</a></li>
			<li class="layui-nav-item" lay-unselect><a id="7" href="javascript:;">脚本管理</a></li>
    		<li class="layui-nav-item" lay-unselect><a id="3" href="javascript:;">定时策略</a></li>
    		<li class="layui-nav-item" lay-unselect>
    			<a id="4" href="javascript:;">任务管理</a>
    		</li>
    		<li class="layui-nav-item" lay-unselect>
    			<a id="5" href="javascript:;">监控管理</a>
    		</li>
			<li class="layui-nav-item" lay-unselect>
    			<a id="6" href="javascript:;">用户管理</a>
    		</li>
    	</ul>
		<ul style="height: 60px;" class="layui-nav layui-layout-right layuiNavFirst">
			<li class="layui-nav-item">
				<a onclick="logout()" class=""><i class="fa fa fa-sign-out"></i> 退出</a>
			</li>
		</ul>
    </div>
	<div class="header-header">
		<ul class="layuiNavSectend">
			<div class="headerNav" id="headerNav1">
				<li>
					<a class="J_menuItem layuiNavSectendLiA" th:href="@{/web/main.shtml}" href="/web/main.shtml">&nbsp;首页</a>
				</li>
			</div>
			<div class="headerNav" style="display: none;" id="headerNav2">
				<li>
					<a class="J_menuItem layuiNavSectendLiA" th:href="@{/web/repository/list.shtml}" href="/web/repository/list.shtml">&nbsp;资源库管理</a>
				</li>
			</div>
			<div class="headerNav" style="display: none;" id="headerNav7">
				<li>
					<a class="J_menuItem layuiNavSectendLiA" th:href="@{/web/script/list.shtml}" href="/web/repository/list.shtml">&nbsp;脚本管理</a>
				</li>
			</div>
			<div class="headerNav" style="display: none;" id="headerNav3">
				<li>
					<a class="J_menuItem layuiNavSectendLiA" th:href="@{/web/quartz/list.shtml}" href="/web/quartz/list.shtml">&nbsp;定时策略</a>
				</li>
			</div>
			<div class="headerNav" style="display: none;" id="headerNav4">
				<li>
					<a class="J_menuItem layuiNavSectendLiA" th:href="@{/web/category/list.shtml}" href="/web/category/list.shtml">&nbsp;任务分类</a>
				</li>
				<li>
					<a class="J_menuItem" th:href="@{/web/job/list.shtml}" href="/web/job/list.shtml">&nbsp;作业管理</a>
				</li>
				<li>
					<a class="J_menuItem" th:href="@{/web/trans/list.shtml}" href="/web/trans/list.shtml">&nbsp;转换管理</a>
				</li>
			</div>
			<div class="headerNav" style="display: none;" id="headerNav5">
				<li>
					<a class="J_menuItem layuiNavSectendLiA" th:href="@{/web/job/monitor/list.shtml}" href="/web/job/monitor/list.shtml">&nbsp;作业监控</a>
				</li>
				<li>
					<a class="J_menuItem" th:href="@{/web/trans/monitor/list.shtml}" href="/web/trans/monitor/list.shtml">&nbsp;转换监控</a>
				</li>
			</div>
			<div class="headerNav" style="display: none;" id="headerNav6">
				<li>
					<a class="J_menuItem layuiNavSectendLiA" th:href="@{/web/user/list.shtml}" href="/web/user/list.shtml">&nbsp;用户列表</a>
				</li>
			</div>
		</ul>
	</div>
    <!--导航结束-->
    <!--右侧部分开始-->
    <div id="page-wrapper" class="gray-bg dashbard-1">
        <!-- <div class="row border-bottom">
            <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                <div class="navbar-header">
                    <a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="javascript:void(0)"><i class="fa fa-bars"></i></a>
                    <div class="navbar-title">数据采集平台</div>
                </div>
                <div class="navbar-user"></div>
            </nav>
        </div> -->
        <div class="row content-tabs">
            <!-- <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i></button>
            <nav class="page-tabs J_menuTabs">
                <div class="page-tabs-content">
                    <a th:href="@{/web/main.shtml}" href="/web/main.shtml" class="active J_menuTab" data-id="web/main.shtml">首页</a>
                </div>
            </nav>
            <button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i></button>
            <div class="btn-group roll-nav roll-right">
                <button class="dropdown J_tabClose" data-toggle="dropdown">关闭操作<span class="caret"></span></button>
                <ul role="menu" class="dropdown-menu dropdown-menu-right">
                    <li class="J_tabShowActive">
                        <a>定位当前选项卡</a>
                    </li>
                    <li class="divider"></li>
                    <li class="J_tabCloseAll">
                        <a>关闭全部选项卡</a>
                    </li>
                    <li class="J_tabCloseOther">
                        <a>关闭其他选项卡</a>
                    </li>
                </ul>
            </div> -->
            <!-- <a onclick="logout()" class="roll-nav roll-right J_tabExit"><i class="fa fa fa-sign-out"></i> 退出</a> -->
        </div>
        <div class="row J_mainContent" id="content-main">
            <iframe class="J_iframe" name="iframe0" width="100%" height="100%" th:src="@{/web/main.shtml}" src="/web/main.shtml" frameborder="0" seamless></iframe>
        </div>
        <div class="footer">
            <div class="copy-right"></div>
        </div>
    </div>
    <!--右侧部分结束-->
</div>
<!-- 全局js -->
<script th:src="@{/js/jquery.min.js}" src="../static/js/jquery.min.js?v=2.1.4"></script>
<script th:src="@{/js/bootstrap.min.js}" src="../static/js/bootstrap.min.js?v=3.3.6"></script>
<script th:src="@{/js/plugins/metisMenu/jquery.metisMenu.js}" src="../static/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script th:src="@{/js/plugins/slimscroll/jquery.slimscroll.min.js}" src="../static/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script th:src="@{/js/plugins/layer/layer.min.js}" src="../static/js/plugins/layer/layer.min.js"></script>
<!-- ECharts -->
<script th:src="@{/js/plugins/echarts/echarts.js}" src="../static/js/plugins/echarts/echarts.js"></script>
<!-- 第三方插件 -->
<script type="text/javascript" th:src="@{/js/plugins/pace/pace.min.js}" src="../static/js/plugins/pace/pace.min.js"></script>
<!-- 自定义js -->
<script type="text/javascript" th:src="@{/js/hplus.js}"  src="../static/js/hplus.js?v=4.1.0"></script>
<script type="text/javascript" th:src="@{/js/contabs.js}" src="../static/js/contabs.js"></script>
<script>
$(document).ready(function () {
	$('.layuiNavColor li a').hover(function() {
		$(this).addClass("layuiNavColorA").closest("li").siblings("li:has(a.layuiNavColorA)").children("a").removeClass(
			"layuiNavColorA");
		var id = $(this).attr("id");
		$('#headerNav' + id).show().siblings().hide();
	});
	
	$('.headerNav li a').click(function() {
		$(this).addClass("layuiNavSectendLiA").closest("li").siblings("li:has(a.layuiNavSectendLiA)").children("a").removeClass(
			"layuiNavSectendLiA");
	});
	
    // 根据用户名查询用户信息显示
    getUserInfo();
    /*判断是否为管理员*/
    isAdmin();
});

function isAdmin() {
    var username = window.localStorage.getItem("username");
    if('admin' !== username) {
        $("#isAdmin").hide();
    }
}

/*退出登录*/
function logout() {
    $.ajax({
        type: 'GET',
        async: false,
        url: '/sys/login/out.do',
        success: function (res) {
            if (!res.success) {
                alert(res.message);
            } else {
                window.localStorage.clear();
                window.location.replace("/");
            }
        },
        error: function () {
            alert("请求失败！请刷新页面重试");
        },
        dataType: 'json'
    });
}

function getUserInfo() {
    var username = window.localStorage.getItem("username");
    $.ajax({
        type: 'GET',
        async: false,
        url: '/sys/user/getUserByUsername.do?username=' + username,
        success: function (res) {
            if (!res.success) {
                alert(res.message);
            } else {
                $(".navbar-user").text('你好, ' + res.result.nickname);
                window.localStorage.setItem('userInfo', JSON.stringify(res.result));
            }
        },
        error: function () {
            alert("请求失败！请刷新页面重试");
        },
        dataType: 'json'
    });
}
</script>
<script type="text/javascript">document.write(unescape("%3Cspan id='cnzz_stat_icon_1279530240'%3E%3C/span%3E%3Cscript src='https://v1.cnzz.com/z_stat.php%3Fid%3D1279530240' type='text/javascript'%3E%3C/script%3E"));</script>
</body>
</html>
